package com.sz.stock.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class StockBuyOrSaleExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public StockBuyOrSaleExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andStockBSIdIsNull() {
            addCriterion("STOCK_B_S_ID is null");
            return (Criteria) this;
        }

        public Criteria andStockBSIdIsNotNull() {
            addCriterion("STOCK_B_S_ID is not null");
            return (Criteria) this;
        }

        public Criteria andStockBSIdEqualTo(Integer value) {
            addCriterion("STOCK_B_S_ID =", value, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdNotEqualTo(Integer value) {
            addCriterion("STOCK_B_S_ID <>", value, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdGreaterThan(Integer value) {
            addCriterion("STOCK_B_S_ID >", value, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("STOCK_B_S_ID >=", value, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdLessThan(Integer value) {
            addCriterion("STOCK_B_S_ID <", value, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdLessThanOrEqualTo(Integer value) {
            addCriterion("STOCK_B_S_ID <=", value, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdIn(List<Integer> values) {
            addCriterion("STOCK_B_S_ID in", values, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdNotIn(List<Integer> values) {
            addCriterion("STOCK_B_S_ID not in", values, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_B_S_ID between", value1, value2, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockBSIdNotBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_B_S_ID not between", value1, value2, "stockBSId");
            return (Criteria) this;
        }

        public Criteria andStockCodeIsNull() {
            addCriterion("STOCK_CODE is null");
            return (Criteria) this;
        }

        public Criteria andStockCodeIsNotNull() {
            addCriterion("STOCK_CODE is not null");
            return (Criteria) this;
        }

        public Criteria andStockCodeEqualTo(String value) {
            addCriterion("STOCK_CODE =", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeNotEqualTo(String value) {
            addCriterion("STOCK_CODE <>", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeGreaterThan(String value) {
            addCriterion("STOCK_CODE >", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeGreaterThanOrEqualTo(String value) {
            addCriterion("STOCK_CODE >=", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeLessThan(String value) {
            addCriterion("STOCK_CODE <", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeLessThanOrEqualTo(String value) {
            addCriterion("STOCK_CODE <=", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeLike(String value) {
            addCriterion("STOCK_CODE like", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeNotLike(String value) {
            addCriterion("STOCK_CODE not like", value, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeIn(List<String> values) {
            addCriterion("STOCK_CODE in", values, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeNotIn(List<String> values) {
            addCriterion("STOCK_CODE not in", values, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeBetween(String value1, String value2) {
            addCriterion("STOCK_CODE between", value1, value2, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockCodeNotBetween(String value1, String value2) {
            addCriterion("STOCK_CODE not between", value1, value2, "stockCode");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeIsNull() {
            addCriterion("STOCK_B_S_TYPE is null");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeIsNotNull() {
            addCriterion("STOCK_B_S_TYPE is not null");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeEqualTo(String value) {
            addCriterion("STOCK_B_S_TYPE =", value, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeNotEqualTo(String value) {
            addCriterion("STOCK_B_S_TYPE <>", value, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeGreaterThan(String value) {
            addCriterion("STOCK_B_S_TYPE >", value, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeGreaterThanOrEqualTo(String value) {
            addCriterion("STOCK_B_S_TYPE >=", value, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeLessThan(String value) {
            addCriterion("STOCK_B_S_TYPE <", value, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeLessThanOrEqualTo(String value) {
            addCriterion("STOCK_B_S_TYPE <=", value, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeLike(String value) {
            addCriterion("STOCK_B_S_TYPE like", value, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeNotLike(String value) {
            addCriterion("STOCK_B_S_TYPE not like", value, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeIn(List<String> values) {
            addCriterion("STOCK_B_S_TYPE in", values, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeNotIn(List<String> values) {
            addCriterion("STOCK_B_S_TYPE not in", values, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeBetween(String value1, String value2) {
            addCriterion("STOCK_B_S_TYPE between", value1, value2, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSTypeNotBetween(String value1, String value2) {
            addCriterion("STOCK_B_S_TYPE not between", value1, value2, "stockBSType");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceIsNull() {
            addCriterion("STOCK_B_S_PRICE is null");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceIsNotNull() {
            addCriterion("STOCK_B_S_PRICE is not null");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceEqualTo(BigDecimal value) {
            addCriterion("STOCK_B_S_PRICE =", value, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceNotEqualTo(BigDecimal value) {
            addCriterion("STOCK_B_S_PRICE <>", value, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceGreaterThan(BigDecimal value) {
            addCriterion("STOCK_B_S_PRICE >", value, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("STOCK_B_S_PRICE >=", value, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceLessThan(BigDecimal value) {
            addCriterion("STOCK_B_S_PRICE <", value, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("STOCK_B_S_PRICE <=", value, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceIn(List<BigDecimal> values) {
            addCriterion("STOCK_B_S_PRICE in", values, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceNotIn(List<BigDecimal> values) {
            addCriterion("STOCK_B_S_PRICE not in", values, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("STOCK_B_S_PRICE between", value1, value2, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("STOCK_B_S_PRICE not between", value1, value2, "stockBSPrice");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityIsNull() {
            addCriterion("STOCK_B_S_QUANTITY is null");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityIsNotNull() {
            addCriterion("STOCK_B_S_QUANTITY is not null");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityEqualTo(Integer value) {
            addCriterion("STOCK_B_S_QUANTITY =", value, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityNotEqualTo(Integer value) {
            addCriterion("STOCK_B_S_QUANTITY <>", value, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityGreaterThan(Integer value) {
            addCriterion("STOCK_B_S_QUANTITY >", value, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityGreaterThanOrEqualTo(Integer value) {
            addCriterion("STOCK_B_S_QUANTITY >=", value, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityLessThan(Integer value) {
            addCriterion("STOCK_B_S_QUANTITY <", value, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityLessThanOrEqualTo(Integer value) {
            addCriterion("STOCK_B_S_QUANTITY <=", value, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityIn(List<Integer> values) {
            addCriterion("STOCK_B_S_QUANTITY in", values, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityNotIn(List<Integer> values) {
            addCriterion("STOCK_B_S_QUANTITY not in", values, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_B_S_QUANTITY between", value1, value2, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockBSQuantityNotBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_B_S_QUANTITY not between", value1, value2, "stockBSQuantity");
            return (Criteria) this;
        }

        public Criteria andStockIdIsNull() {
            addCriterion("STOCK_ID is null");
            return (Criteria) this;
        }

        public Criteria andStockIdIsNotNull() {
            addCriterion("STOCK_ID is not null");
            return (Criteria) this;
        }

        public Criteria andStockIdEqualTo(Integer value) {
            addCriterion("STOCK_ID =", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdNotEqualTo(Integer value) {
            addCriterion("STOCK_ID <>", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdGreaterThan(Integer value) {
            addCriterion("STOCK_ID >", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("STOCK_ID >=", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdLessThan(Integer value) {
            addCriterion("STOCK_ID <", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdLessThanOrEqualTo(Integer value) {
            addCriterion("STOCK_ID <=", value, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdIn(List<Integer> values) {
            addCriterion("STOCK_ID in", values, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdNotIn(List<Integer> values) {
            addCriterion("STOCK_ID not in", values, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_ID between", value1, value2, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockIdNotBetween(Integer value1, Integer value2) {
            addCriterion("STOCK_ID not between", value1, value2, "stockId");
            return (Criteria) this;
        }

        public Criteria andStockTimeIsNull() {
            addCriterion("STOCK_TIME is null");
            return (Criteria) this;
        }

        public Criteria andStockTimeIsNotNull() {
            addCriterion("STOCK_TIME is not null");
            return (Criteria) this;
        }

        public Criteria andStockTimeEqualTo(Object value) {
            addCriterion("STOCK_TIME =", value, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeNotEqualTo(Object value) {
            addCriterion("STOCK_TIME <>", value, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeGreaterThan(Object value) {
            addCriterion("STOCK_TIME >", value, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeGreaterThanOrEqualTo(Object value) {
            addCriterion("STOCK_TIME >=", value, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeLessThan(Object value) {
            addCriterion("STOCK_TIME <", value, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeLessThanOrEqualTo(Object value) {
            addCriterion("STOCK_TIME <=", value, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeIn(List<Object> values) {
            addCriterion("STOCK_TIME in", values, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeNotIn(List<Object> values) {
            addCriterion("STOCK_TIME not in", values, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeBetween(Object value1, Object value2) {
            addCriterion("STOCK_TIME between", value1, value2, "stockTime");
            return (Criteria) this;
        }

        public Criteria andStockTimeNotBetween(Object value1, Object value2) {
            addCriterion("STOCK_TIME not between", value1, value2, "stockTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}